home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / dist / libiberty / dummy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-02  |  975 b   |  35 lines

  1. #include <ansidecl.h>
  2.  
  3. #ifdef __STDC__
  4. #include <stddef.h>
  5. #define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS);
  6. #else
  7. #define void int
  8. #define size_t unsigned long
  9. #define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME ();
  10. #endif
  11.  
  12. #include "functions.def"
  13.  
  14. /* Always use our: getopt.o getopt1.o obstack.o spaces.o */
  15.  
  16. void
  17. main (argc, argv)
  18.      int argc; char **argv;
  19. {
  20.  
  21. /* Create a dummy function call for each DEF-defined function. */
  22.  
  23. #undef DEF
  24. #undef AND
  25. #define AND = 0;
  26. /* ARGS expands into a set of declaration.  NAME ARG_LIST expands
  27.    info a function call that uses those variables as actual parameters.
  28.    If the function has been DEF'ed correctly, we can pass the right
  29.    number and types of parameters, which is nice.  (E.g. gcc may
  30.    otherwise complain about the wrong number of parameters to certain
  31.    builtins.) */
  32. #define DEF(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
  33. #include "functions.def"
  34. }
  35.